package com.danskin.wechat.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.danskin.wechat.dao.WxMessageDao;
import com.danskin.wechat.dao.WxMessageNewsDao;
import com.danskin.wechat.entity.WxMessage;
import com.danskin.wechat.entity.WxMessageNews;
import com.danskin.wechat.service.WxMessageService;

@Service
public class WxMessageServiceImpl implements WxMessageService {

	@Autowired
	private WxMessageDao wxMessageDao;

	@Autowired
	private WxMessageNewsDao wxMessageNewsDao;

	@Override
	public WxMessage getWxMessage(Integer messageId) {
		
		return wxMessageDao.selectById(messageId);
	}

	@Override
	public List<WxMessageNews> getWxMessageNews(Integer messageId) {
		// TODO Auto-generated method stub
		return wxMessageNewsDao.selectByMessageId(messageId);
	}

}
